<template>
  <div style="background-color:#fff;padding:20px">
    <!-- :scroll="{x:1200,y:485}" -->
    <a-button type="primary" @click="addMember()" style="margin-bottom:10px">添加用户</a-button>
    <a-table
      :loading="loading"
      rowKey="id"
      @change="handleTableChange"
      :pagination="false"
      :columns="columns"
      style="border:none"
      :dataSource="dataSource"
      size="small"
    >
    </a-table>
  </div>
</template>

<script>
export default {
  data() {
    return {
      lodaing: false,
      columns,
      dataSource: []
    }
  },
  created() {
    this.dataSource = [
      {
        staffNo: '007',
        staffName: '测试',
        role: '测试',
        phone: '测试',
        status: '测试',
        wxbd: '测试',
        lx: '测试',
        lxdh: '测试',
        yx: '测试',
        operation: '测试'
      },
      {
        staffNo: '007',
        staffName: '测试',
        role: '测试',
        phone: '测试',
        status: '测试',
        wxbd: '测试',
        lx: '测试',
        lxdh: '测试',
        yx: '测试',
        operation: '测试'
      },
      {
        staffNo: '007',
        staffName: '测试',
        role: '测试',
        phone: '测试',
        status: '测试',
        wxbd: '测试',
        lx: '测试',
        lxdh: '测试',
        yx: '测试',
        operation: '测试'
      },
      {
        staffNo: '007',
        staffName: '测试',
        role: '测试',
        phone: '测试',
        status: '测试',
        wxbd: '测试',
        lx: '测试',
        lxdh: '测试',
        yx: '测试',
        operation: '测试'
      },
      {
        staffNo: '007',
        staffName: '测试',
        role: '测试',
        phone: '测试',
        status: '测试',
        wxbd: '测试',
        lx: '测试',
        lxdh: '测试',
        yx: '测试',
        operation: '测试'
      },
      {
        staffNo: '007',
        staffName: '测试',
        role: '测试',
        phone: '测试',
        status: '测试',
        wxbd: '测试',
        lx: '测试',
        lxdh: '测试',
        yx: '测试',
        operation: '测试'
      },
      {
        staffNo: '007',
        staffName: '测试',
        role: '测试',
        phone: '测试',
        status: '测试',
        wxbd: '测试',
        lx: '测试',
        lxdh: '测试',
        yx: '测试',
        operation: '测试'
      },
      {
        staffNo: '007',
        staffName: '测试',
        role: '测试',
        phone: '测试',
        status: '测试',
        wxbd: '测试',
        lx: '测试',
        lxdh: '测试',
        yx: '测试',
        operation: '测试'
      },
      {
        staffNo: '007',
        staffName: '测试',
        role: '测试',
        phone: '测试',
        status: '测试',
        wxbd: '测试',
        lx: '测试',
        lxdh: '测试',
        yx: '测试',
        operation: '测试'
      },
      {
        staffNo: '007',
        staffName: '测试',
        role: '测试',
        phone: '测试',
        status: '测试',
        wxbd: '测试',
        lx: '测试',
        lxdh: '测试',
        yx: '测试',
        operation: '测试'
      },
      {
        staffNo: '007',
        staffName: '测试',
        role: '测试',
        phone: '测试',
        status: '测试',
        wxbd: '测试',
        lx: '测试',
        lxdh: '测试',
        yx: '测试',
        operation: '测试'
      }
    ]
  },
  methods: {
    handleTableChange() {},
    addMember() {}
  }
}

const columns = [
  {
    title: '员工编号',
    dataIndex: 'staffNo',
    width: '9.75%',
    align: 'center',
    scopedSlots: { customRender: 'staffNo' },
    ellipsis: true
  },
  {
    title: '姓名',
    dataIndex: 'staffName',
    width: '9.75%',
    align: 'center',
    ellipsis: true,
    scopedSlots: { customRender: 'staffName' }
  },

  {
    title: '岗位名称',
    dataIndex: 'role',
    width: '9.75%',
    align: 'center',
    ellipsis: true,
    scopedSlots: { customRender: 'role' }
  },
  {
    title: '登陆账号',
    dataIndex: 'phone',
    width: '9.75%',
    align: 'center',
    ellipsis: true,
    scopedSlots: { customRender: 'phone' }
  },
  {
    title: '归属', //省市级
    dataIndex: 'status',
    width: '9.75%',
    align: 'center',
    ellipsis: true,
    scopedSlots: { customRender: 'status' }
  },
  {
    title: '人员类型', //角色
    dataIndex: 'wxbd',
    width: '9.75%',
    align: 'center',
    ellipsis: true,
    scopedSlots: { customRender: 'wxbd' }
  },
  {
    title: '权限',
    dataIndex: 'lx',
    width: '9.75%',
    align: 'center',
    ellipsis: true,
    scopedSlots: { customRender: 'lx' }
  },
  {
    title: '联系电话',
    dataIndex: 'lxdh',
    width: '9.75%',
    align: 'center',
    ellipsis: true,
    scopedSlots: { customRender: 'lxdh' }
  },
  {
    title: '邮箱',
    dataIndex: 'yx',
    width: '9.75%',
    align: 'center',
    ellipsis: true,
    scopedSlots: { customRender: 'yx' }
  },
  {
    title: '操作',
    dataIndex: 'operation',
    width: '14%',
    align: 'center',
    ellipsis: true,
    scopedSlots: { customRender: 'operation' }
  }
]
</script>

<style scoped></style>
